[NFC] Switch to new pass generation tablegen definitions. #4370
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit completes the migration from the deprecated GEN_PASS_CLASSES
to the new GEN_PASS_DEF infrastructure across all torch-mlir passes.
Changes include:
Remove PassDetail.h files (deprecated pattern)
Migrate conversion passes to GEN_PASS_DEF
Migrate dialect transform passes
Handle passes with options (TorchToStablehlo, TorchToTosa)
using BaseClass::BaseClassHandle passes without options (RefBackend)
Fix backend type conversion passes
Fix missing namespace closures
The migration maintains full backward compatibility while adopting the
recommended LLVM pass infrastructure patterns. All passes now use the
generated base classes and follow consistent patterns based on whether
they have options defined in tablegen.
This is the preparation for llvm/llvm-project#166904
Signed-off-by: hanhanW [email protected]